/*    */ package com.zimbra.cs.html;
/*    */ 
/*    */ import java.io.IOException;
/*    */ import java.io.InputStream;
/*    */ import java.io.InputStreamReader;
/*    */ import java.io.Reader;
/*    */ import java.io.StringWriter;
/*    */ import java.io.Writer;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class NoopDefang
/*    */   implements BrowserDefang
/*    */ {
/*    */   private static final int COPY_BUFFER = 256;
/*    */   
/*    */   public String defang(String text, boolean neuterImages)
/*    */     throws IOException
/*    */   {
/* 42 */     return text;
/*    */   }
/*    */   
/*    */   public String defang(InputStream is, boolean neuterImages)
/*    */     throws IOException
/*    */   {
/* 48 */     InputStreamReader reader = new InputStreamReader(is, "utf-8");
/* 49 */     return defang(reader, neuterImages);
/*    */   }
/*    */   
/*    */   public String defang(Reader reader, boolean neuterImages)
/*    */     throws IOException
/*    */   {
/* 55 */     StringWriter writer = new StringWriter();
/* 56 */     char[] buffer = new char['Ā'];
/* 57 */     int read = 0;
/* 58 */     while ((read = reader.read(buffer)) > 0) {
/* 59 */       writer.write(buffer, 0, read);
/*    */     }
/*    */     
/* 62 */     return writer.toString();
/*    */   }
/*    */   
/*    */   public void defang(InputStream is, boolean neuterImages, Writer out)
/*    */     throws IOException
/*    */   {
/* 68 */     InputStreamReader reader = new InputStreamReader(is, "utf-8");
/* 69 */     defang(reader, neuterImages, out);
/*    */   }
/*    */   
/*    */ 
/*    */   public void defang(Reader reader, boolean neuterImages, Writer out)
/*    */     throws IOException
/*    */   {
/* 76 */     char[] buffer = new char['Ā'];
/* 77 */     int read = 0;
/* 78 */     while ((read = reader.read(buffer)) > 0) {
/* 79 */       out.write(buffer, 0, read);
/*    */     }
/*    */   }
/*    */ }


/* Location:              /home/mint/zimbrastore.jar!/com/zimbra/cs/html/NoopDefang.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       0.7.1
 */